//
//  XMNetwork+login.h
//  XMJJ_zml
//
//  Created by apple on 2025/5/9.
//

#import "XMNetwork.h"

NS_ASSUME_NONNULL_BEGIN

@interface XMNetwork (login)

/**
 本机号码一键登录
 */
- (void)loginWithPhoneNum:(NSString *)phoneNumStr
                  success:(void (^)(id responseObject))successBlock
                  failure:(void (^)(NSError *error))failureBlock;

/**
 获取验证码
 */
- (void)getCodeWithPhoneNum:(NSString *)phoneNumStr
                       type:(NSString *)codeType
                    success:(void(^)(id responseObject))successBlock
                    failure:(void (^)(NSError *error))failureBlock;

/**
 校验验证码
 */
- (void)valieCodeWithPhoneNum:(NSString *)phoneNum
                      codeStr:(NSString *)codeStr
                      success:(void (^)(id responseObject))successBlock
                      failure:(void (^)(NSError *error))failureBlock;

/**
 手机号验证码登录
 */
- (void)loginWithPhone:(NSString *)phoneNum
                  code:(NSString *)codeStr
               success:(void (^)(id responseObject))successBlock
               failure:(void (^)(NSError *error))failureBlock;

/**
 绑定手机号
 */
- (void)bindPhoneWithCode:(NSString *)codeStr
                  success:(void (^)(id responseObject))successBlock
                  failure:(void (^)(NSError *error))failureBlock;

/**
 获取微信信息
 */
- (void)getWechatInfoWithRespcode:(NSString *)respcode
                          success:(void (^)(id responseObject))successBlock
                          failure:(void (^)(NSError *error))failureBlock;

/**
 微信登录
 */
- (void)wechatLoginWithCode:(NSString *)codeStr
                    success:(void (^)(id responseObject))successBlock
                    failure:(void (^)(NSError *error))failureBlock;

/**
 判断微信是否绑定手机号
 */
- (void)wechatHasBindPhoneWithAccessToken:(NSString *)accessToken
                                   openId:(NSString *)openId
                                  unionId:(NSString *)unionId
                                  success:(void (^)(id responseObject))successBlock
                                  failure:(void (^)(NSError *error))failureBlock;

/**
 微信登陆
 */
- (void)wechatLoginWithAccessToken:(NSString *)accessToken
                            openId:(NSString *)openId
                           unionId:(NSString *)unionId
                             phone:(NSString *)phone
                           success:(void (^)(id responseObject))successBlock
                           failure:(void (^)(NSError *error))failureBlock;

/**
 隐私政策
 */
- (void)getServiceInfoWithType:(NSString *)type
                       success:(void (^)(id responseObject))successBlock
                       failure:(void (^)(NSError *error))failureBlock;

@end

NS_ASSUME_NONNULL_END
